﻿using GalaSoft.MvvmLight.CommandWpf;
using Mimi.Models.DataModels;
using Mimi.Models.UIModels;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mimi.ViewModels
{
    public interface IBudgetViewModel
    {
        #region Properties
        /// <summary>
        /// Total Budget Percentage
        /// </summary>
        double TotalBudgetPercentage { get; set; }

        /// <summary>
        /// Total budget
        /// </summary>
        double TotalBudget { get; set; }

        /// <summary>
        /// Purposes collection
        /// </summary>
        List<Purpose> Purposes { get; set; }

        /// <summary>
        /// Binding Purpose Collection
        /// </summary>
        ObservableCollection<UIPurpose> BindingPurposeCollection { get; set; }

        /// <summary>
        /// Value type collection that is bound to UI
        /// </summary>
        ObservableCollection<string> BindingValueType { get; set; }

        /// <summary>
        /// Selected value type
        /// </summary>
        string SelectedValueType { get; set; }

        /// <summary>
        /// Description
        /// </summary>
        string Description { get; set; }

        /// <summary>
        /// Quota
        /// </summary>
        string Quota { get; set; }

        /// <summary>
        /// Default Currency
        /// </summary>
        Currency DefaultCurrency { get; set; }
        #endregion

        #region Commands
        /// <summary>
        /// Add new budget
        /// </summary>
        RelayCommand AddNewBudgetCommand { get; }

        /// <summary>
        /// Reset input
        /// </summary>
        RelayCommand ResetInputCommand { get; }
        #endregion

        #region Methods
        /// <summary>
        /// Add new budget
        /// </summary>
        void AddNewBudget();

        /// <summary>
        /// Load stored budget data
        /// </summary>
        void LoadStoredData();

        /// <summary>
        /// Update budget on aproriate purpose
        /// </summary>
        void UpdateBudgets(Expense expense);

        /// <summary>
        /// Update budget when total balance was edited
        /// </summary>
        /// <param name="value"></param>
        IEnumerable<Income> UpdateBudgetsWithNewBalance(double value);
        #endregion
    }
}
